WPF and Silverlight Edition Basic Library > LayoutPanels > Layout Panels Quick Starts > WrapPanel Quick Start |
The following quick start guide is intended to get you up and running with WrapPanel for Silverlight. In this quick start, you'll create a new project in Visual Studio, add styled HyperlinkButtons that can be wrapped, and change the orientation for the buttons.
To set up your project, complete the following steps:
New Project Dialog
- WPF: C1.WPF.4.dll
- Silverlight: C1.Silverlight.5.dll
In the next step, you'll add, style, and wrap several HyperlinkButtons.
We're going to use simple HyperlinkButtons to show how content can be wrapped vertically or horizontally. This is the typical scenario to create a TagCloud view; very commonly used in Web applications.
XAML Copy Code <HyperlinkButton Content="Example Text" FontSize="25" /> <HyperlinkButton Content="Longer sentences can be used for wrapping scenarios." /> <HyperlinkButton Content="Let's insert a break." /> <HyperlinkButton c1:C1WrapPanel.BreakLine="After" Content="Break After" /> <HyperlinkButton Content="C1WrapPanel" /> <HyperlinkButton Content="Wrap Vertically" /> <HyperlinkButton Content="Wrap Horizontally" FontSize="20" /> <HyperlinkButton c1:C1WrapPanel.BreakLine="Before" Content="Break Before" /> <HyperlinkButton Content="Controls" FontSize="8" /> <HyperlinkButton Content="Silverlight" /> <HyperlinkButton Content="Components" FontSize="18" /> <HyperlinkButton c1:C1WrapPanel.BreakLine="AfterAndBefore" Content="Break After and Before" /> <HyperlinkButton Content="Create flow type layouts that wrap content vertically or horizontally." /> <HyperlinkButton Content="Small font size is not recommended." FontSize="6" /> <HyperlinkButton Content="The End" FontSize="24" />
In the next step, you'll run the application.
Now you're ready to run the application. Complete the following steps:
XAML Copy Code<c1:C1WrapPanel Orientation="Vertical">
Notice how the buttons are stacked vertically.
Congratulations! You have successfully completed the WrapPanel for Silverlight quick start.